{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Task"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Our targets come from the Penn World Tables and the OECD for the years 1995 to 2015."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-05-23T21:27:23.710720Z",
     "start_time": "2019-05-23T21:27:23.169011Z"
    }
   },
   "outputs": [],
   "source": [
    "from matplotlib import pyplot as plt\n",
    "import numpy as np\n",
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-05-23T21:27:23.715108Z",
     "start_time": "2019-05-23T21:27:23.712348Z"
    }
   },
   "outputs": [],
   "source": [
    "countries = ['us','fr','it','dk','sp','nl','se','de']\n",
    "countries = [c.upper() for c in countries]\n",
    "cnames = ['United States','France','Italy','Denmark','Spain','Netherlands','Sweden','Germany']\n",
    "co = dict(zip(countries,cnames))\n",
    "ce = dict(zip(cnames,countries))\n",
    "data = '../data_sources/'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We use Penn World Tables (https://www.rug.nl/ggdc/productivity/pwt/) for the capital to income ratio,  $\\frac{k}{y}$, consumption to income,  $\\frac{c}{y}$, and for relative GDP  $\\frac{y}{y_{US}}$."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-05-23T21:27:26.449801Z",
     "start_time": "2019-05-23T21:27:23.916292Z"
    }
   },
   "outputs": [],
   "source": [
    "penn = pd.read_excel(data+'pwt/pwt90.xlsx',sheet_name='Data')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Select years and countries"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-05-23T21:27:26.453853Z",
     "start_time": "2019-05-23T21:27:26.451682Z"
    }
   },
   "outputs": [],
   "source": [
    "years = range(1995,2016,1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-05-23T21:27:26.462259Z",
     "start_time": "2019-05-23T21:27:26.455321Z"
    }
   },
   "outputs": [],
   "source": [
    "penn = penn[(penn['year'].isin(years)) & (penn['country'].isin(cnames))]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>countrycode</th>\n",
       "      <th>country</th>\n",
       "      <th>currency_unit</th>\n",
       "      <th>year</th>\n",
       "      <th>rgdpe</th>\n",
       "      <th>rgdpo</th>\n",
       "      <th>pop</th>\n",
       "      <th>emp</th>\n",
       "      <th>avh</th>\n",
       "      <th>hc</th>\n",
       "      <th>...</th>\n",
       "      <th>csh_g</th>\n",
       "      <th>csh_x</th>\n",
       "      <th>csh_m</th>\n",
       "      <th>csh_r</th>\n",
       "      <th>pl_c</th>\n",
       "      <th>pl_i</th>\n",
       "      <th>pl_g</th>\n",
       "      <th>pl_x</th>\n",
       "      <th>pl_m</th>\n",
       "      <th>pl_k</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>3035</th>\n",
       "      <td>DEU</td>\n",
       "      <td>Germany</td>\n",
       "      <td>Euro</td>\n",
       "      <td>1995</td>\n",
       "      <td>2444280.75</td>\n",
       "      <td>2376434.00</td>\n",
       "      <td>81.612900</td>\n",
       "      <td>37.939034</td>\n",
       "      <td>1527.978292</td>\n",
       "      <td>3.497632</td>\n",
       "      <td>...</td>\n",
       "      <td>0.135220</td>\n",
       "      <td>0.348669</td>\n",
       "      <td>-0.361674</td>\n",
       "      <td>0.000000e+00</td>\n",
       "      <td>1.033949</td>\n",
       "      <td>0.952057</td>\n",
       "      <td>1.559026</td>\n",
       "      <td>0.694944</td>\n",
       "      <td>0.655703</td>\n",
       "      <td>1.145803</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3036</th>\n",
       "      <td>DEU</td>\n",
       "      <td>Germany</td>\n",
       "      <td>Euro</td>\n",
       "      <td>1996</td>\n",
       "      <td>2474957.50</td>\n",
       "      <td>2409760.75</td>\n",
       "      <td>81.870772</td>\n",
       "      <td>37.959774</td>\n",
       "      <td>1510.495404</td>\n",
       "      <td>3.511262</td>\n",
       "      <td>...</td>\n",
       "      <td>0.134964</td>\n",
       "      <td>0.346536</td>\n",
       "      <td>-0.353329</td>\n",
       "      <td>1.859867e-16</td>\n",
       "      <td>0.976098</td>\n",
       "      <td>0.934430</td>\n",
       "      <td>1.514511</td>\n",
       "      <td>0.696348</td>\n",
       "      <td>0.658500</td>\n",
       "      <td>1.094040</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3037</th>\n",
       "      <td>DEU</td>\n",
       "      <td>Germany</td>\n",
       "      <td>Euro</td>\n",
       "      <td>1997</td>\n",
       "      <td>2565733.00</td>\n",
       "      <td>2481533.50</td>\n",
       "      <td>81.993831</td>\n",
       "      <td>37.939022</td>\n",
       "      <td>1499.644241</td>\n",
       "      <td>3.524946</td>\n",
       "      <td>...</td>\n",
       "      <td>0.136400</td>\n",
       "      <td>0.346886</td>\n",
       "      <td>-0.342708</td>\n",
       "      <td>0.000000e+00</td>\n",
       "      <td>0.834261</td>\n",
       "      <td>0.826947</td>\n",
       "      <td>1.250930</td>\n",
       "      <td>0.656168</td>\n",
       "      <td>0.633227</td>\n",
       "      <td>0.969747</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3038</th>\n",
       "      <td>DEU</td>\n",
       "      <td>Germany</td>\n",
       "      <td>Euro</td>\n",
       "      <td>1998</td>\n",
       "      <td>2670308.75</td>\n",
       "      <td>2555663.00</td>\n",
       "      <td>82.010184</td>\n",
       "      <td>38.400684</td>\n",
       "      <td>1493.581899</td>\n",
       "      <td>3.538684</td>\n",
       "      <td>...</td>\n",
       "      <td>0.136556</td>\n",
       "      <td>0.374267</td>\n",
       "      <td>-0.359334</td>\n",
       "      <td>-2.075864e-16</td>\n",
       "      <td>0.808360</td>\n",
       "      <td>0.836381</td>\n",
       "      <td>1.193275</td>\n",
       "      <td>0.612878</td>\n",
       "      <td>0.606401</td>\n",
       "      <td>0.974770</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3039</th>\n",
       "      <td>DEU</td>\n",
       "      <td>Germany</td>\n",
       "      <td>Euro</td>\n",
       "      <td>1999</td>\n",
       "      <td>2768837.75</td>\n",
       "      <td>2641263.50</td>\n",
       "      <td>81.965830</td>\n",
       "      <td>38.979191</td>\n",
       "      <td>1478.722041</td>\n",
       "      <td>3.552474</td>\n",
       "      <td>...</td>\n",
       "      <td>0.139956</td>\n",
       "      <td>0.365609</td>\n",
       "      <td>-0.357325</td>\n",
       "      <td>0.000000e+00</td>\n",
       "      <td>0.758368</td>\n",
       "      <td>0.812084</td>\n",
       "      <td>1.107785</td>\n",
       "      <td>0.606163</td>\n",
       "      <td>0.603862</td>\n",
       "      <td>0.954278</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 47 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "     countrycode  country currency_unit  year       rgdpe       rgdpo  \\\n",
       "3035         DEU  Germany          Euro  1995  2444280.75  2376434.00   \n",
       "3036         DEU  Germany          Euro  1996  2474957.50  2409760.75   \n",
       "3037         DEU  Germany          Euro  1997  2565733.00  2481533.50   \n",
       "3038         DEU  Germany          Euro  1998  2670308.75  2555663.00   \n",
       "3039         DEU  Germany          Euro  1999  2768837.75  2641263.50   \n",
       "\n",
       "            pop        emp          avh        hc  ...     csh_g     csh_x  \\\n",
       "3035  81.612900  37.939034  1527.978292  3.497632  ...  0.135220  0.348669   \n",
       "3036  81.870772  37.959774  1510.495404  3.511262  ...  0.134964  0.346536   \n",
       "3037  81.993831  37.939022  1499.644241  3.524946  ...  0.136400  0.346886   \n",
       "3038  82.010184  38.400684  1493.581899  3.538684  ...  0.136556  0.374267   \n",
       "3039  81.965830  38.979191  1478.722041  3.552474  ...  0.139956  0.365609   \n",
       "\n",
       "         csh_m         csh_r      pl_c      pl_i      pl_g      pl_x  \\\n",
       "3035 -0.361674  0.000000e+00  1.033949  0.952057  1.559026  0.694944   \n",
       "3036 -0.353329  1.859867e-16  0.976098  0.934430  1.514511  0.696348   \n",
       "3037 -0.342708  0.000000e+00  0.834261  0.826947  1.250930  0.656168   \n",
       "3038 -0.359334 -2.075864e-16  0.808360  0.836381  1.193275  0.612878   \n",
       "3039 -0.357325  0.000000e+00  0.758368  0.812084  1.107785  0.606163   \n",
       "\n",
       "          pl_m      pl_k  \n",
       "3035  0.655703  1.145803  \n",
       "3036  0.658500  1.094040  \n",
       "3037  0.633227  0.969747  \n",
       "3038  0.606401  0.974770  \n",
       "3039  0.603862  0.954278  \n",
       "\n",
       "[5 rows x 47 columns]"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "penn.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We now compute variables"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Construct Variables"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-05-23T21:28:18.868130Z",
     "start_time": "2019-05-23T21:28:18.802311Z"
    }
   },
   "outputs": [],
   "source": [
    "penn = penn[['country','year','pop','rconna','rgdpna','rkna']]\n",
    "penn['year'] = penn['year'].astype(str)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We use real consumption at 2011 level National prices (in millions, 2011 US)."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-05-23T21:28:19.873183Z",
     "start_time": "2019-05-23T21:28:19.596214Z"
    }
   },
   "outputs": [],
   "source": [
    "penn['csy'] = penn['rconna']/penn['rgdpna']"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We use the capital stock at constant 2011 National prices (in millions, 2011 US)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-05-23T21:28:44.515558Z",
     "start_time": "2019-05-23T21:28:44.511882Z"
    }
   },
   "outputs": [],
   "source": [
    "penn['ksy'] = penn['rkna']/penn['rgdpna']"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We compute GDP per capita using real GDP at constant 2011 prices (in millions 2011 US) and divide by total population (in millions)."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-05-23T21:29:10.283912Z",
     "start_time": "2019-05-23T21:29:10.280549Z"
    }
   },
   "outputs": [],
   "source": [
    "penn['rgdpnap'] = penn['rgdpna']/penn['pop']"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We compute deviations relative to US."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-05-23T21:29:37.119258Z",
     "start_time": "2019-05-23T21:29:36.845617Z"
    }
   },
   "outputs": [],
   "source": [
    "temp = penn[['rgdpnap','country','year']]\n",
    "temp = temp.set_index(['year','country'])\n",
    "temp = temp.unstack()\n",
    "for c in cnames[1:]:\n",
    "    temp['rgdpnap'][c] = temp['rgdpnap'][c]/temp['rgdpnap']['United States']\n",
    "temp['rgdpnap']['United States'] = temp['rgdpnap']['United States']/temp['rgdpnap']['United States']\n",
    "temp = temp.stack()\n",
    "temp.columns = ['ys']\n",
    "ys = temp.reset_index().set_index(['country','year']).sort_index()\n",
    "penn = penn.set_index(['country','year'])\n",
    "penn = penn.merge(ys,left_index=True,right_index=True)\n",
    "penn = penn[['csy','ksy','ys']]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We have the following moments across countries and years"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-05-23T21:30:12.052365Z",
     "start_time": "2019-05-23T21:30:12.035116Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>csy</th>\n",
       "      <th>ksy</th>\n",
       "      <th>ys</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>count</th>\n",
       "      <td>160.000000</td>\n",
       "      <td>160.000000</td>\n",
       "      <td>160.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mean</th>\n",
       "      <td>0.744910</td>\n",
       "      <td>4.226871</td>\n",
       "      <td>0.814297</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>std</th>\n",
       "      <td>0.047945</td>\n",
       "      <td>0.650458</td>\n",
       "      <td>0.108000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>min</th>\n",
       "      <td>0.636059</td>\n",
       "      <td>2.962467</td>\n",
       "      <td>0.599292</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25%</th>\n",
       "      <td>0.710768</td>\n",
       "      <td>3.902014</td>\n",
       "      <td>0.735718</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50%</th>\n",
       "      <td>0.751858</td>\n",
       "      <td>4.240006</td>\n",
       "      <td>0.820280</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75%</th>\n",
       "      <td>0.770197</td>\n",
       "      <td>4.552309</td>\n",
       "      <td>0.883126</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>max</th>\n",
       "      <td>0.851606</td>\n",
       "      <td>5.936691</td>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "              csy         ksy          ys\n",
       "count  160.000000  160.000000  160.000000\n",
       "mean     0.744910    4.226871    0.814297\n",
       "std      0.047945    0.650458    0.108000\n",
       "min      0.636059    2.962467    0.599292\n",
       "25%      0.710768    3.902014    0.735718\n",
       "50%      0.751858    4.240006    0.820280\n",
       "75%      0.770197    4.552309    0.883126\n",
       "max      0.851606    5.936691    1.000000"
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "penn.describe()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>csy</th>\n",
       "      <th>ksy</th>\n",
       "      <th>ys</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>country</th>\n",
       "      <th>year</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"5\" valign=\"top\">Germany</th>\n",
       "      <th>1995</th>\n",
       "      <td>0.770485</td>\n",
       "      <td>3.612009</td>\n",
       "      <td>0.864700</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1996</th>\n",
       "      <td>0.775610</td>\n",
       "      <td>3.668945</td>\n",
       "      <td>0.847332</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1997</th>\n",
       "      <td>0.767639</td>\n",
       "      <td>3.685918</td>\n",
       "      <td>0.835105</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1998</th>\n",
       "      <td>0.763689</td>\n",
       "      <td>3.702503</td>\n",
       "      <td>0.825562</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1999</th>\n",
       "      <td>0.765286</td>\n",
       "      <td>3.723471</td>\n",
       "      <td>0.814552</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                   csy       ksy        ys\n",
       "country year                              \n",
       "Germany 1995  0.770485  3.612009  0.864700\n",
       "        1996  0.775610  3.668945  0.847332\n",
       "        1997  0.767639  3.685918  0.835105\n",
       "        1998  0.763689  3.702503  0.825562\n",
       "        1999  0.765286  3.723471  0.814552"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "penn.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# GDP Share of Expenditures"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We take the GDP share of medical expenditures (all financing sources) from OECD Health Data 2018. We process the table downloaded directly from OECD."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-05-23T21:31:30.051482Z",
     "start_time": "2019-05-23T21:31:30.034976Z"
    }
   },
   "outputs": [],
   "source": [
    "labels = ['country','unit','scrap']\n",
    "for t in range(1995,2016):\n",
    "    labels.append(str(t))\n",
    "oecd = pd.read_excel(data+'oecd/oecd-shares-1995-2015.xlsx',skiprows=7,skipfooter=3)\n",
    "oecd.columns = labels\n",
    "oecd = oecd.drop(columns=['scrap','unit'])\n",
    "oecd = oecd.set_index('country')\n",
    "oecd = oecd.stack().to_frame()\n",
    "oecd.columns = ['s']\n",
    "oecd['s'] = oecd['s']/100.0\n",
    "oecd.index.names = ['country','year']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>s</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>country</th>\n",
       "      <th>year</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"5\" valign=\"top\">Denmark</th>\n",
       "      <th>1995</th>\n",
       "      <td>0.07771</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1996</th>\n",
       "      <td>0.07839</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1997</th>\n",
       "      <td>0.07750</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1998</th>\n",
       "      <td>0.07552</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1999</th>\n",
       "      <td>0.08342</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                    s\n",
       "country year         \n",
       "Denmark 1995  0.07771\n",
       "        1996  0.07839\n",
       "        1997  0.07750\n",
       "        1998  0.07552\n",
       "        1999  0.08342"
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "oecd.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We merge back to Penn Tables."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-05-23T21:31:45.625688Z",
     "start_time": "2019-05-23T21:31:45.617832Z"
    }
   },
   "outputs": [],
   "source": [
    "penn = penn.merge(oecd,left_index=True,right_index=True)\n",
    "penn = penn.reset_index()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>country</th>\n",
       "      <th>year</th>\n",
       "      <th>csy</th>\n",
       "      <th>ksy</th>\n",
       "      <th>ys</th>\n",
       "      <th>s</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>Germany</td>\n",
       "      <td>1995</td>\n",
       "      <td>0.770485</td>\n",
       "      <td>3.612009</td>\n",
       "      <td>0.864700</td>\n",
       "      <td>0.09500</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Germany</td>\n",
       "      <td>1996</td>\n",
       "      <td>0.775610</td>\n",
       "      <td>3.668945</td>\n",
       "      <td>0.847332</td>\n",
       "      <td>0.09785</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Germany</td>\n",
       "      <td>1997</td>\n",
       "      <td>0.767639</td>\n",
       "      <td>3.685918</td>\n",
       "      <td>0.835105</td>\n",
       "      <td>0.09664</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>Germany</td>\n",
       "      <td>1998</td>\n",
       "      <td>0.763689</td>\n",
       "      <td>3.702503</td>\n",
       "      <td>0.825562</td>\n",
       "      <td>0.09687</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Germany</td>\n",
       "      <td>1999</td>\n",
       "      <td>0.765286</td>\n",
       "      <td>3.723471</td>\n",
       "      <td>0.814552</td>\n",
       "      <td>0.09768</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   country  year       csy       ksy        ys        s\n",
       "0  Germany  1995  0.770485  3.612009  0.864700  0.09500\n",
       "1  Germany  1996  0.775610  3.668945  0.847332  0.09785\n",
       "2  Germany  1997  0.767639  3.685918  0.835105  0.09664\n",
       "3  Germany  1998  0.763689  3.702503  0.825562  0.09687\n",
       "4  Germany  1999  0.765286  3.723471  0.814552  0.09768"
      ]
     },
     "execution_count": 32,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "penn.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Statistics"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We compute consumption as a share of GDP consistent with the model. We only need this statistic for the U.S. as it is only used for that country. WE substract government consumption from Penn World Table consumption but add health spending which is public, Medicare and Medicaid. The first step is to get government consumption as a share of GDP. We use Fred for this (https://fred.stlouisfed.org/series/DPCERE1Q156NBEA).We keep the value for 2005. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.18980952380952382"
      ]
     },
     "execution_count": 41,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "fred = pd.read_excel('../data_sources/fred/gsy.xls',sheet_name='data')\n",
    "gsy = fred.loc[fred.year<2016,'gsy'].mean()/100.0\n",
    "gsy"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>year</th>\n",
       "      <th>gsy</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1995</td>\n",
       "      <td>18.975</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1996</td>\n",
       "      <td>18.500</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1997</td>\n",
       "      <td>18.050</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1998</td>\n",
       "      <td>17.775</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1999</td>\n",
       "      <td>17.850</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>2000</td>\n",
       "      <td>17.825</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>2001</td>\n",
       "      <td>18.425</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>2002</td>\n",
       "      <td>19.125</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>2003</td>\n",
       "      <td>19.275</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>2004</td>\n",
       "      <td>19.150</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>2005</td>\n",
       "      <td>19.000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>2006</td>\n",
       "      <td>19.000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>2007</td>\n",
       "      <td>19.275</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>2008</td>\n",
       "      <td>20.200</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>2009</td>\n",
       "      <td>21.250</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>2010</td>\n",
       "      <td>20.975</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>2011</td>\n",
       "      <td>20.200</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>2012</td>\n",
       "      <td>19.300</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>2013</td>\n",
       "      <td>18.600</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>2014</td>\n",
       "      <td>18.075</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>2015</td>\n",
       "      <td>17.775</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>2016</td>\n",
       "      <td>17.675</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    year     gsy\n",
       "0   1995  18.975\n",
       "1   1996  18.500\n",
       "2   1997  18.050\n",
       "3   1998  17.775\n",
       "4   1999  17.850\n",
       "5   2000  17.825\n",
       "6   2001  18.425\n",
       "7   2002  19.125\n",
       "8   2003  19.275\n",
       "9   2004  19.150\n",
       "10  2005  19.000\n",
       "11  2006  19.000\n",
       "12  2007  19.275\n",
       "13  2008  20.200\n",
       "14  2009  21.250\n",
       "15  2010  20.975\n",
       "16  2011  20.200\n",
       "17  2012  19.300\n",
       "18  2013  18.600\n",
       "19  2014  18.075\n",
       "20  2015  17.775\n",
       "21  2016  17.675"
      ]
     },
     "execution_count": 42,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "fred"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We substract from public spending the part attributed to Medicare and Medicaid, which from National Health Accounts, represents 33% of all personal Health Expenditures.  "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "metadata": {},
   "outputs": [],
   "source": [
    "share_pub = 0.33"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We then adjust the Penn World Numbers"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 53,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-05-23T21:32:41.166946Z",
     "start_time": "2019-05-23T21:32:41.163365Z"
    }
   },
   "outputs": [],
   "source": [
    "penn.loc[penn.country=='United States','cnsy'] = penn.loc[penn.country=='United States','csy'] - (gsy - share_pub*penn.loc[penn.country=='United States','s'])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We compute means and standard errors by country over these years."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 54,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-05-23T21:32:59.670623Z",
     "start_time": "2019-05-23T21:32:59.613140Z"
    }
   },
   "outputs": [],
   "source": [
    "targets = penn[['cnsy','s','ys','ksy']].groupby(penn['country']).describe()\n",
    "targets = targets.reset_index()\n",
    "targets['co'] = targets['country'].replace(ce)\n",
    "targets.set_index('co',inplace=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 55,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-05-23T21:33:06.533191Z",
     "start_time": "2019-05-23T21:33:06.512712Z"
    }
   },
   "outputs": [],
   "source": [
    "names = ['cnsy','s','ys','ksy']"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Saving Targets"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We save means and standard error of the mean in moments directory."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 56,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/Users/loulou/.local/lib/python3.8/site-packages/pandas/core/indexing.py:1732: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  self._setitem_single_block(indexer, value, name)\n",
      "/Users/loulou/.local/lib/python3.8/site-packages/pandas/core/indexing.py:723: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  iloc._setitem_with_indexer(indexer, value, self.name)\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th>co</th>\n",
       "      <th>DK</th>\n",
       "      <th>FR</th>\n",
       "      <th>DE</th>\n",
       "      <th>IT</th>\n",
       "      <th>NL</th>\n",
       "      <th>SP</th>\n",
       "      <th>SE</th>\n",
       "      <th>US</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>cshare</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.682899</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mshare</th>\n",
       "      <td>0.090629</td>\n",
       "      <td>0.103574</td>\n",
       "      <td>0.102286</td>\n",
       "      <td>0.081089</td>\n",
       "      <td>0.088282</td>\n",
       "      <td>0.078123</td>\n",
       "      <td>0.085785</td>\n",
       "      <td>0.144225</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>tfp</th>\n",
       "      <td>0.898205</td>\n",
       "      <td>0.735264</td>\n",
       "      <td>0.830156</td>\n",
       "      <td>0.739971</td>\n",
       "      <td>0.872562</td>\n",
       "      <td>0.640259</td>\n",
       "      <td>0.797962</td>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>kshare</th>\n",
       "      <td>4.134086</td>\n",
       "      <td>4.426736</td>\n",
       "      <td>3.807190</td>\n",
       "      <td>5.116111</td>\n",
       "      <td>4.294942</td>\n",
       "      <td>4.827075</td>\n",
       "      <td>4.131106</td>\n",
       "      <td>3.077725</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "co            DK        FR        DE        IT        NL        SP        SE  \\\n",
       "cshare       NaN       NaN       NaN       NaN       NaN       NaN       NaN   \n",
       "mshare  0.090629  0.103574  0.102286  0.081089  0.088282  0.078123  0.085785   \n",
       "tfp     0.898205  0.735264  0.830156  0.739971  0.872562  0.640259  0.797962   \n",
       "kshare  4.134086  4.426736  3.807190  5.116111  4.294942  4.827075  4.131106   \n",
       "\n",
       "co            US  \n",
       "cshare  0.682899  \n",
       "mshare  0.144225  \n",
       "tfp     1.000000  \n",
       "kshare  3.077725  "
      ]
     },
     "execution_count": 56,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "means = targets.loc[:,targets.columns.get_level_values(1)=='mean']\n",
    "means.columns = ['cshare','mshare','tfp','kshare']\n",
    "means.loc[means.index.isin([c for c in countries if c!='US']),'cshare'] = np.nan\n",
    "stds = targets.loc[:,targets.columns.get_level_values(1)=='std']/np.sqrt(2015-1995+1)\n",
    "stds.columns = ['cshare','mshare','tfp','kshare']\n",
    "stds.loc[stds.index.isin([c for c in countries if c!='US']),'cshare'] = np.nan\n",
    "means.transpose()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 57,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(0.0876095, 0.7831693755107656)"
      ]
     },
     "execution_count": 57,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "means.loc[['DK','SE','FR','IT','NL','SP','SE'],'mshare'].mean(),means.loc[['DK','SE','FR','IT','NL','SP','SE'],'tfp'].mean()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 58,
   "metadata": {},
   "outputs": [],
   "source": [
    "means.transpose().to_pickle('../estimation/moments/means_macro.pkl')\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 59,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th>co</th>\n",
       "      <th>DK</th>\n",
       "      <th>FR</th>\n",
       "      <th>DE</th>\n",
       "      <th>IT</th>\n",
       "      <th>NL</th>\n",
       "      <th>SP</th>\n",
       "      <th>SE</th>\n",
       "      <th>US</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>cshare</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.017642</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mshare</th>\n",
       "      <td>0.009913</td>\n",
       "      <td>0.007025</td>\n",
       "      <td>0.005096</td>\n",
       "      <td>0.007282</td>\n",
       "      <td>0.014508</td>\n",
       "      <td>0.009155</td>\n",
       "      <td>0.013101</td>\n",
       "      <td>0.016178</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>tfp</th>\n",
       "      <td>0.027095</td>\n",
       "      <td>0.012841</td>\n",
       "      <td>0.024683</td>\n",
       "      <td>0.046430</td>\n",
       "      <td>0.018157</td>\n",
       "      <td>0.021694</td>\n",
       "      <td>0.032258</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>kshare</th>\n",
       "      <td>0.250125</td>\n",
       "      <td>0.199957</td>\n",
       "      <td>0.109525</td>\n",
       "      <td>0.444126</td>\n",
       "      <td>0.143179</td>\n",
       "      <td>0.532728</td>\n",
       "      <td>0.257594</td>\n",
       "      <td>0.074448</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "co            DK        FR        DE        IT        NL        SP        SE  \\\n",
       "cshare       NaN       NaN       NaN       NaN       NaN       NaN       NaN   \n",
       "mshare  0.009913  0.007025  0.005096  0.007282  0.014508  0.009155  0.013101   \n",
       "tfp     0.027095  0.012841  0.024683  0.046430  0.018157  0.021694  0.032258   \n",
       "kshare  0.250125  0.199957  0.109525  0.444126  0.143179  0.532728  0.257594   \n",
       "\n",
       "co            US  \n",
       "cshare  0.017642  \n",
       "mshare  0.016178  \n",
       "tfp     0.000000  \n",
       "kshare  0.074448  "
      ]
     },
     "execution_count": 59,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "stds.transpose()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 51,
   "metadata": {},
   "outputs": [],
   "source": [
    "stds.transpose().to_pickle('../estimation/moments/stds_macro.pkl')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "interpreter": {
   "hash": "cf2a50979671a58939829e6829efb726aa5da11149213b77bd50351f899d04fb"
  },
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.4"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  },
  "varInspector": {
   "cols": {
    "lenName": 16,
    "lenType": 16,
    "lenVar": 40
   },
   "kernels_config": {
    "python": {
     "delete_cmd_postfix": "",
     "delete_cmd_prefix": "del ",
     "library": "var_list.py",
     "varRefreshCmd": "print(var_dic_list())"
    },
    "r": {
     "delete_cmd_postfix": ") ",
     "delete_cmd_prefix": "rm(",
     "library": "var_list.r",
     "varRefreshCmd": "cat(var_dic_list()) "
    }
   },
   "types_to_exclude": [
    "module",
    "function",
    "builtin_function_or_method",
    "instance",
    "_Feature"
   ],
   "window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
